package com.dongdong.api;



import com.dongdong.vo.OrderVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("dds-order-service")
public interface OrderApi {   //openfeign的远程调用 映射对应方法

    // 更改订单状态 order表
    @PostMapping("/order/updateOrder")
    public void updateOrder(@RequestParam String out_trade_no,@RequestParam String trade_no,@RequestParam String trade_status );



    // 通过用户id查看所有订单 order表
    @GetMapping("/order/selectAllByUsername")
    public List<OrderVO> selectAllByUsername(@RequestParam String id );

    //退款后修改订单状态
    @PostMapping("/order/UpdateRefundQuery")
    void UpdateRefundQuery(@RequestParam String outTradeNo);
}
